package cn.lg.soar.system.feign;


import cn.lg.soar.core.annotations.ApiClient;
import cn.lg.soar.system.api.constant.ModuleConst;
import cn.lg.soar.system.api.service.ITokenCurrBindApi;
import cn.lg.soar.system.feign.fallback.TokenCurrBindApiFallbackFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.Serializable;
import java.util.Map;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ConditionalOnMissingClass("cn.lg.soar.system.auth.client.TokenCurrBindApiClient")
@ApiClient
@FeignClient(
        name= ModuleConst.MODULE_NAME,
        path= ModuleConst.CLIENT_PATH + "/TokenCurrBind",
        fallbackFactory= TokenCurrBindApiFallbackFactory.class,
        contextId="TokenCurrBindApiFeign"
)
public interface TokenCurrBindApiFeign extends ITokenCurrBindApi {

    @PostMapping("set")
    @Override
    boolean set(@RequestBody Map<String, Serializable> map);

    @GetMapping("get")
    @Override
    Map<String, Object> get();

}
